
define(['jquery'],()=>{
    
    const baseUrl='http://www.xmyxapp.com/api'
    return {
        getTabs (){
     return new Promise(resolve=>{
     $.get(`${baseUrl}/tabs`,resolve)
         })
        },
        getCategory (id){
            return new Promise(resolve=>{
           $.get(`${baseUrl}/tab/${id}?sort=1`,resolve)
            })
        },
        getDetail(id){
            return new Promise(resolve=>{
                $.get(`${baseUrl}/detail`,{id},resolve)
            })
        }
      }
});